from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.conf import settings
from vegmapportal.views import post_handler
from vegmapportal.models import Park
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    (r'^map/?$', direct_to_template, {'template':'map.html','extra_context':{'settings':settings, 'parks':Park.objects.all()}}),
    (r'^post_test/$', post_handler),
    (r'^ajax/$', direct_to_template, {'template': 'ajaxtest.html','extra_context':{'settings':settings}}),
    (r'^media/(.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT})    ,
    ('^admin/', include(admin.site.urls)),

)
